package com.adopapa.ethexplorer.domain;

import java.time.Instant;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.JoinColumn;
import javax.persistence.Lob;
import javax.persistence.OneToOne;
import javax.persistence.Table;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonIgnore;

@Entity
@Table(name = "WALLET_INFO")
public class WalletInfo extends BaseUuidEntity {

	private static final long serialVersionUID = 5472966415267489937L;

//	@OneToOne
//	@JoinColumn(name = "user_info_id")
//	private UserInfo userInfo;

	@Column(name = "alias")
	private String alias;
	@Column(name = "address")
	private String address;
	@Lob
	@Column(name = "keystore")
	private String keystore;
	@JsonIgnore
	@Column(name = "password")
	private String password;
	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss.SSS", timezone = "GMT+8")
	@Column(name = "create_time")
	private Instant createTime;

	///////////////////////////////////////////////////////////////////

//	public UserInfo getUserInfo() {
//		return userInfo;
//	}
//
//	public void setUserInfo(UserInfo userInfo) {
//		this.userInfo = userInfo;
//	}
//
//	public WalletInfo userInfo(UserInfo userInfo) {
//		this.userInfo = userInfo;
//		return this;
//	}

	public String getAlias() {
		return alias;
	}

	public void setAlias(String alias) {
		this.alias = alias;
	}

	public WalletInfo alias(String alias) {
		this.alias = alias;
		return this;
	}

	public String getAddress() {
		return address;
	}

	public void setAddress(String address) {
		this.address = address;
	}

	public WalletInfo address(String address) {
		this.address = address;
		return this;
	}

	public String getKeystore() {
		return keystore;
	}

	public void setKeystore(String keystore) {
		this.keystore = keystore;
	}

	public WalletInfo keystore(String keystore) {
		this.keystore = keystore;
		return this;
	}

	public String getPassword() {
		return password;
	}

	public void setPassword(String password) {
		this.password = password;
	}

	public WalletInfo password(String password) {
		this.password = password;
		return this;
	}

	public Instant getCreateTime() {
		return createTime;
	}

	public void setCreateTime(Instant createTime) {
		this.createTime = createTime;
	}

	public WalletInfo createTime(Instant createTime) {
		this.createTime = createTime;
		return this;
	}

}
